package net.toocruel.iqismart.service.core;

import net.toocruel.iqismart.dao.condition.ArticlesCondition;
import net.toocruel.iqismart.entity.core.Article;
import net.toocruel.iqismart.entity.rbac.User;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;

import java.util.List;

/**
 * @Description
 * @Auther sty
 * @createTime 2018/5/15 上午9:59
 */
public interface ArticleService {
    Article postArticle(Article article);

    Article editArticle(Article article);

    List<Article> getSuggests(String word);

    Page<Article> findAll(ArticlesCondition condition, PageRequest pageRequest);

    void addViews(Article article);

    Article findById(Long id);

    List<User> getTopUsers();

    List<Article> getHotArticles(int count);

    List<User> getHotUsers(int count);

    List<Article> getLatestArticles(int i);
}
